﻿using System;

namespace _08_ClassDemo
{
    class Cube
    {
        private int _id;
        private float length;
        private float width;
        private float height;

        // Setter
        public void SetLength(float length)
        {
            this.length = length;
        }
        public void SetWidth(float width)
        {
            this.width = width;
        }
        public void SetHeight(float height)
        {
            this.height = height;
        }
        public void GetVolume(out float volume)
        {
            volume = length * width * height;
        }
    }

    internal class Program
    {
        static void Main(string[] args)
        {
            Cube cube = new Cube();
            cube.SetLength(23.54f);
            cube.SetWidth(12.64f);
            cube.SetHeight(22.21f);
            float volume = 0;
            cube.GetVolume(out volume);
            Console.WriteLine("Volumn of the cube: {0}", volume);
            Console.ReadKey();
        }
    }
}
